package com.woniuxy.member.client;

import com.woniuxy.member.client.param.ExchangeCouponSearchParam;
import com.woniuxy.member.client.param.ExchangeFoodSearchParam;
import com.woniuxy.member.client.result.ExchangeCouponClientDto;
import com.woniuxy.member.client.result.ExchangeFoodClientDto;
import com.woniuxy.member.client.result.MemberClientDto;
import com.woniuxy.member.client.result.MemberCouponClientDto;
import common.WoniuPage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import result.Result;

import java.util.List;

@FeignClient(contextId = "memberQueryClient",name="member",path="member")
public interface MemberQueryClient {

    @GetMapping("/getScoreExchangeFood")
    public Result<WoniuPage<ExchangeFoodClientDto>> getScoreExchangeFood(@SpringQueryMap ExchangeFoodSearchParam exchangeFoodSearchParam);

    @GetMapping("/getScoreExchangeCoupon")
    public Result<List<ExchangeCouponClientDto>> getScoreExchangeCoupon(@SpringQueryMap ExchangeCouponSearchParam exchangeCouponSearchParam);

    @GetMapping("/getMemberCoupon")
    public Result<List<MemberCouponClientDto>> getMemberCoupon();

    @GetMapping("/getMemberCouponById")
    public Result<List<MemberCouponClientDto>> getMemberCouponById(@RequestParam("couponId")Integer couponId);

    @GetMapping("/getMemberByMemberId")
    public Result<MemberClientDto> getMemberByMemberId(@RequestParam("memberId")Integer memberId);

    @GetMapping("getMemberFoodBySkuId")
    public Result<ExchangeFoodClientDto> getMemberFoodBySkuId(@RequestParam("skuId")Integer skuId);

    @GetMapping("getMemberCouponByCouponId")
    public Result<ExchangeCouponClientDto> getMemberCouponByCouponId(@RequestParam("couponId")Integer couponId);
}
